package com.nativetalk.bean.teacher;

import com.nativetalk.common.Constants;
import org.apache.commons.lang.StringUtils;
import org.hibernate.validator.constraints.Email;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * TdNtTeacher entity. @author MyEclipse Persistence Tools
 */

public class TdNtTeacherRegister implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	// Fields

	private int tea_id;
	private String tea_name;
	@Email(message = "{EMAIL.REGEXP}")
	private String tea_email;
	@NotNull(message = "Sorry password format error. Numbers and letters accepted only.")
	@Pattern(regexp = "^[0-9a-zA-Z]{6,20}$", message = "Sorry password format error. Numbers and letters accepted only.")
	private String tea_password;
	@NotNull(message = "Verification code error")
	@Pattern(regexp = "^\\d{6}$", message = "Verification code error")
	private String code;//验证码
	@Pattern(regexp = "^[0-9a-zA-Z]{8,12}$", message = "Please enter the correct invitation code")
	private String invite_code;
	private String equ_type;//1android 2ios
    private String equ_client_id = Constants.default_equ_id;//设备唯一标示  Android:clientId ios:devicetoken

	public void setEqu_type(String equ_type) {
		this.equ_type = equ_type;
	}

	public void setEqu_client_id(String equ_client_id) {
		this.equ_client_id = equ_client_id;
	}

	public String getEqu_type() {
		return equ_type;
	}

	public String getEqu_client_id() {
		return equ_client_id;
	}

	private Timestamp tea_register_time;
	private String tea_register_month;
	private BigDecimal tea_balance;
	private String tea_islock;
	private String tea_head_portrait;
	private String tea_sex;
	private Timestamp tea_birthday;
	private String tea_synopsis;
	private String tea_sound_synopsis;
	private Integer tea_ages;
	private BigDecimal tea_score;
	private String tea_invite_code;
	private String token;
	private String state;//0在线 2忙碌 1离线
	private BigDecimal tea_total_balance;//总收入
	private Integer tea_times;//教学分钟数
	private Integer state_order;//状态排序 0在线 1忙碌 2离线
	private String uid;

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public Integer getState_order() {
		return state_order;
	}

	public void setState_order(Integer state_order) {
		this.state_order = state_order;
	}

	public BigDecimal getTea_total_balance() {
		return tea_total_balance;
	}

	public Integer getTea_times() {
		return tea_times;
	}

	public void setTea_times(Integer tea_times) {
		this.tea_times = tea_times;
	}

	public void setTea_total_balance(BigDecimal tea_total_balance) {
		this.tea_total_balance = tea_total_balance;
	}
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getCode() {
        if (StringUtils.isNotBlank(code)) {
            code.trim();
        }
        return code;
	}

	public String getInvite_code() {
		return invite_code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public void setInvite_code(String invite_code) {
		this.invite_code = invite_code;
	}

	public String getToken(){ return  token;}
	public void  setToken(String token){ this.token = token;}
	public int getTea_id() {
		return tea_id;
	}
	public void setTea_id(int tea_id) {
		this.tea_id = tea_id;
	}
	public String getTea_name() {
		return tea_name;
	}
	public void setTea_name(String tea_name) {
		this.tea_name = tea_name;
	}
	public String getTea_email() {
		return tea_email;
	}
	public void setTea_email(String tea_email) {
		this.tea_email = tea_email;
	}
	public String getTea_password() {
		return tea_password;
	}
	public void setTea_password(String tea_password) {
		this.tea_password = tea_password;
	}
	public Timestamp getTea_register_time() {
		return tea_register_time;
	}
	public void setTea_register_time(Timestamp tea_register_time) {
		this.tea_register_time = tea_register_time;
	}
	public String getTea_register_month() {
		return tea_register_month;
	}
	public void setTea_register_month(String tea_register_month) {
		this.tea_register_month = tea_register_month;
	}
	public BigDecimal getTea_balance() {
		return tea_balance;
	}
	public void setTea_balance(BigDecimal tea_balance) {
		this.tea_balance = tea_balance;
	}
	public String getTea_islock() {
		return tea_islock;
	}
	public void setTea_islock(String tea_islock) {
		this.tea_islock = tea_islock;
	}
	public String getTea_head_portrait() {
		return tea_head_portrait;
	}
	public void setTea_head_portrait(String tea_head_portrait) {
		this.tea_head_portrait = tea_head_portrait;
	}
	public String getTea_sex() {
		return tea_sex;
	}
	public void setTea_sex(String tea_sex) {
		this.tea_sex = tea_sex;
	}
	public Timestamp getTea_birthday() {
		return tea_birthday;
	}
	public void setTea_birthday(Timestamp tea_birthday) {
		this.tea_birthday = tea_birthday;
	}
	public String getTea_synopsis() {
		return tea_synopsis;
	}
	public void setTea_synopsis(String tea_synopsis) {
		this.tea_synopsis = tea_synopsis;
	}
	public String getTea_sound_synopsis() {
		return tea_sound_synopsis;
	}
	public void setTea_sound_synopsis(String tea_sound_synopsis) {
		this.tea_sound_synopsis = tea_sound_synopsis;
	}
	public Integer getTea_ages() {
		return tea_ages;
	}
	public void setTea_ages(Integer tea_ages) {
		this.tea_ages = tea_ages;
	}
	public BigDecimal getTea_score() {
		return tea_score;
	}
	public void setTea_score(BigDecimal tea_score) {
		this.tea_score = tea_score;
	}
	public String getTea_invite_code() {
		return tea_invite_code;
	}
	public void setTea_invite_code(String tea_invite_code) {
		this.tea_invite_code = tea_invite_code;
	}



}